package com.globallogic.vkulyk.SSHTool;

public class CommandExecutionDataKeeper extends ActionDataKeeper {
	private String command = "";

	public CommandExecutionDataKeeper(String type, String user,
			String password, String command) {
		super(type, user, password);
		this.command = command;
	}

	public String getCommand() {
		return command;
	}

	@Override
	public int hashCode() {
		return super.hashCode() + command.hashCode();
	}

	@Override
	public boolean equals(Object thatObj) {
		if (this == thatObj) return true;
		return thatObj instanceof CommandExecutionDataKeeper
				&& super.equals(thatObj)
				&& command.equals(((CommandExecutionDataKeeper) thatObj).getCommand());
	}
	
	@Override
	public String toString() {
		return  super.toString() + " " + command;
	}

}
